$(function(){
	/*获取订单详情*/
	var curData=JSON.parse(sessionStorage.getItem('curData'));
	var orderState;
	switch (curData.orderPayState){
			case '0':
				orderState='待付款';
			break;
			case '1':
				orderState='已付款';
			break;
			case '2':
				orderState='退款';
			break;
			case '3':
				orderState='取消';
			break;
		}
	var payTime=curData.payTime;
	var tabHTML="<div class='content-tab dynamic-tab'>"+
									"<div class='cart-title'>"+
										"<div class='cart-name'>"+
											"<p class='cart-id'>订单编号："+curData.outTradeNo+"</p>"+
										"</div>"+
										"<div style='cart-state'>"+
											"<p>"+orderState+"</p>"+
										"</div>"+
									"</div>"+
									"<div class='dynamic-tab-desc'>"+
										"<ul class='am-list cart-list'>"+
											"<li class='am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left'>"+
													"<div>"+
														"<div class='am-u-sm-4 am-list-thumb'>"+
															   "<a href='javascript:void(0)'><img src='"+curData.attachment_url+"' /></a>"+
														"</div>"+
														"<div class=' am-u-sm-7 am-list-main'>"+
																"<h2 class='am-list-item-hd'><a href='http://www.douban.com/online/11614662/'>"+curData.coursePackageName+"</a></h2>"+
																"<div class='am-list-item-text'><p>主讲人： <span>"+curData.lecturer+"</span> </p></div>"+
																"<div class='am-list-item-text'><p>节数： <span>"+curData.totalCost+"</span></p></div>"+
														"</div>"+
													"</div>"+
												"</li>"+
												"<li>"+
													"<div class='order-payForm'>"+
															"<p>支付说明</p>"+
															"<div class='descXq'>"+
																	"<p>下单时间:</p><p>"+payTime+"</p>"+
															"</div>"+
													"</div>"+
												"</li>"+
												"<li>"+
														"<div class='order-payForm'>"+
																"<p>价格信息</p>"+
																"<div class='descXq'>"+
																		"<p>原价:</p><p>"+curData.totalPrice+"</p>"+
																"</div>"+
														"</div>"+
												"</li>"+
												"<li>"+
														"<div class='order-do'>"+
																"<button>删除订单</button>"+
														"</div>"+
												"</li>"+
											"</ul>"+
										"</div>"+
						    "</div>";
		$('.content').html(tabHTML);
})